<?php
	class controller extends Zend_Controller_Front
	{
        static $_instance;
        public $_options;
        
        public static function getInstance()
        {
            if (null === self::$_instance)
                self::$_instance = new self();
            return self::$_instance;
        }
        
        public function __construct()
        {
            //class statique pas de constructeur;
        }
        
        public function setvar($name, $value)
        {
            $this -> _options -> $name = $value;
        }
        
        function getvar($name)
        {
            return $this -> _options -> $name;
        }
        
        public static function html()
		{
			$html = null;
			$htmlFiles = getvar('**htmlFiles**');
            $start = getvar('**start**');
            $end = getMicrotime();
            setvar('**executionTime**', substr(($end - $start), 0, 5));
            if (null !== $htmlFiles && is_array($htmlFiles) && count($htmlFiles))
			{
				foreach ($htmlFiles as $htmlFile)
					$html .= parsephp(file_get_contents(DIR_VIEWS . $htmlFile . '.html'));
			}
			echo $html;
            return;
		}
	}
?>